<?php
/***
 * 
 * @author GuoLong
 * 2014/12/03
 * 
 */

class Text extends Model {
	/*有用到的其他表：
	 * xdf_user表
	 */
	private $tab_name="xdf_text";
	private $fields=array("id","content");
	public function addText($content) {
		$sql="INSERT INTO `$this->tab_name` (`content`) VALUES('$content');";
		return $this->insert($sql);
	}
	public function getTextById($text_id) {
		$sql="SELECT `content` FROM $this->tab_name WHERE `id`=$text_id;";
		return $this->fetchRow($sql);
	}
	
}